3.66 \(\int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx\)

Optimal. Leaf size=62 \[ \frac{x^{n+1} (a e+b d)}{n+1}+a d x+\frac{x^{2 n+1} (b e+c d)}{2 n+1}+\frac{c e x^{3 n+1}}{3 n+1} \]

[Out]

a*d*x + ((b*d + a*e)*x^(1 + n))/(1 + n) + ((c*d + b*e)*x^(1 + 2*n))/(1 + 2*n) +
(c*e*x^(1 + 3*n))/(1 + 3*n)

_______________________________________________________________________________________

Rubi [A]  time = 0.0827313, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.045 \[ \frac{x^{n+1} (a e+b d)}{n+1}+a d x+\frac{x^{2 n+1} (b e+c d)}{2 n+1}+\frac{c e x^{3 n+1}}{3 n+1} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]

[Out]

a*d*x + ((b*d + a*e)*x^(1 + n))/(1 + n) + ((c*d + b*e)*x^(1 + 2*n))/(1 + 2*n) +
(c*e*x^(1 + 3*n))/(1 + 3*n)

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{c e x^{3 n + 1}}{3 n + 1} + d \int a\, dx + \frac{x^{n + 1} \left (a e + b d\right )}{n + 1} + \frac{x^{2 n + 1} \left (b e + c d\right )}{2 n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d+e*x**n)*(a+b*x**n+c*x**(2*n)),x)

[Out]

c*e*x**(3*n + 1)/(3*n + 1) + d*Integral(a, x) + x**(n + 1)*(a*e + b*d)/(n + 1) +
 x**(2*n + 1)*(b*e + c*d)/(2*n + 1)

_______________________________________________________________________________________

Mathematica [A]  time = 0.198996, size = 57, normalized size = 0.92 \[ x \left (\frac{x^n (a e+b d)}{n+1}+a d+\frac{x^{2 n} (b e+c d)}{2 n+1}+\frac{c e x^{3 n}}{3 n+1}\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]

[Out]

x*(a*d + ((b*d + a*e)*x^n)/(1 + n) + ((c*d + b*e)*x^(2*n))/(1 + 2*n) + (c*e*x^(3
*n))/(1 + 3*n))

_______________________________________________________________________________________

Maple [A]  time = 0.018, size = 66, normalized size = 1.1 \[ adx+{\frac{ \left ( ae+bd \right ) x{{\rm e}^{n\ln \left ( x \right ) }}}{1+n}}+{\frac{ \left ( be+cd \right ) x \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{1+2\,n}}+{\frac{cex \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{3}}{1+3\,n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x)

[Out]

a*d*x+(a*e+b*d)/(1+n)*x*exp(n*ln(x))+(b*e+c*d)/(1+2*n)*x*exp(n*ln(x))^2+c*e/(1+3
*n)*x*exp(n*ln(x))^3

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^(2*n) + b*x^n + a)*(e*x^n + d),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.271977, size = 185, normalized size = 2.98 \[ \frac{{\left (2 \, c e n^{2} + 3 \, c e n + c e\right )} x x^{3 \, n} +{\left (3 \,{\left (c d + b e\right )} n^{2} + c d + b e + 4 \,{\left (c d + b e\right )} n\right )} x x^{2 \, n} +{\left (6 \,{\left (b d + a e\right )} n^{2} + b d + a e + 5 \,{\left (b d + a e\right )} n\right )} x x^{n} +{\left (6 \, a d n^{3} + 11 \, a d n^{2} + 6 \, a d n + a d\right )} x}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^(2*n) + b*x^n + a)*(e*x^n + d),x, algorithm="fricas")

[Out]

((2*c*e*n^2 + 3*c*e*n + c*e)*x*x^(3*n) + (3*(c*d + b*e)*n^2 + c*d + b*e + 4*(c*d
 + b*e)*n)*x*x^(2*n) + (6*(b*d + a*e)*n^2 + b*d + a*e + 5*(b*d + a*e)*n)*x*x^n +
 (6*a*d*n^3 + 11*a*d*n^2 + 6*a*d*n + a*d)*x)/(6*n^3 + 11*n^2 + 6*n + 1)

_______________________________________________________________________________________

Sympy [A]  time = 3.84148, size = 656, normalized size = 10.58 \[ \begin{cases} a d x + a e \log{\left (x \right )} + b d \log{\left (x \right )} - \frac{b e}{x} - \frac{c d}{x} - \frac{c e}{2 x^{2}} & \text{for}\: n = -1 \\a d x + 2 a e \sqrt{x} + 2 b d \sqrt{x} + b e \log{\left (x \right )} + c d \log{\left (x \right )} - \frac{2 c e}{\sqrt{x}} & \text{for}\: n = - \frac{1}{2} \\a d x + \frac{3 a e x^{\frac{2}{3}}}{2} + \frac{3 b d x^{\frac{2}{3}}}{2} + 3 b e \sqrt [3]{x} + 3 c d \sqrt [3]{x} + c e \log{\left (x \right )} & \text{for}\: n = - \frac{1}{3} \\\frac{6 a d n^{3} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{11 a d n^{2} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{6 a d n x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{a d x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{6 a e n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{5 a e n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{a e x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{6 b d n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{5 b d n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{b d x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{3 b e n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{4 b e n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{b e x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{3 c d n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{4 c d n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{c d x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{2 c e n^{2} x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{3 c e n x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{c e x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d+e*x**n)*(a+b*x**n+c*x**(2*n)),x)

[Out]

Piecewise((a*d*x + a*e*log(x) + b*d*log(x) - b*e/x - c*d/x - c*e/(2*x**2), Eq(n,
 -1)), (a*d*x + 2*a*e*sqrt(x) + 2*b*d*sqrt(x) + b*e*log(x) + c*d*log(x) - 2*c*e/
sqrt(x), Eq(n, -1/2)), (a*d*x + 3*a*e*x**(2/3)/2 + 3*b*d*x**(2/3)/2 + 3*b*e*x**(
1/3) + 3*c*d*x**(1/3) + c*e*log(x), Eq(n, -1/3)), (6*a*d*n**3*x/(6*n**3 + 11*n**
2 + 6*n + 1) + 11*a*d*n**2*x/(6*n**3 + 11*n**2 + 6*n + 1) + 6*a*d*n*x/(6*n**3 +
11*n**2 + 6*n + 1) + a*d*x/(6*n**3 + 11*n**2 + 6*n + 1) + 6*a*e*n**2*x*x**n/(6*n
**3 + 11*n**2 + 6*n + 1) + 5*a*e*n*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + a*e*x*x
**n/(6*n**3 + 11*n**2 + 6*n + 1) + 6*b*d*n**2*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1
) + 5*b*d*n*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + b*d*x*x**n/(6*n**3 + 11*n**2 +
 6*n + 1) + 3*b*e*n**2*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 4*b*e*n*x*x**(2
*n)/(6*n**3 + 11*n**2 + 6*n + 1) + b*e*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) +
 3*c*d*n**2*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 4*c*d*n*x*x**(2*n)/(6*n**3
 + 11*n**2 + 6*n + 1) + c*d*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 2*c*e*n**2
*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 3*c*e*n*x*x**(3*n)/(6*n**3 + 11*n**2
+ 6*n + 1) + c*e*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.269814, size = 308, normalized size = 4.97 \[ \frac{6 \, a d n^{3} x + 3 \, c d n^{2} x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 6 \, b d n^{2} x e^{\left (n{\rm ln}\left (x\right )\right )} + 11 \, a d n^{2} x + 4 \, c d n x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 2 \, c n^{2} x e^{\left (3 \, n{\rm ln}\left (x\right ) + 1\right )} + 3 \, b n^{2} x e^{\left (2 \, n{\rm ln}\left (x\right ) + 1\right )} + 6 \, a n^{2} x e^{\left (n{\rm ln}\left (x\right ) + 1\right )} + 5 \, b d n x e^{\left (n{\rm ln}\left (x\right )\right )} + 6 \, a d n x + c d x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 3 \, c n x e^{\left (3 \, n{\rm ln}\left (x\right ) + 1\right )} + 4 \, b n x e^{\left (2 \, n{\rm ln}\left (x\right ) + 1\right )} + 5 \, a n x e^{\left (n{\rm ln}\left (x\right ) + 1\right )} + b d x e^{\left (n{\rm ln}\left (x\right )\right )} + a d x + c x e^{\left (3 \, n{\rm ln}\left (x\right ) + 1\right )} + b x e^{\left (2 \, n{\rm ln}\left (x\right ) + 1\right )} + a x e^{\left (n{\rm ln}\left (x\right ) + 1\right )}}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^(2*n) + b*x^n + a)*(e*x^n + d),x, algorithm="giac")

[Out]

(6*a*d*n^3*x + 3*c*d*n^2*x*e^(2*n*ln(x)) + 6*b*d*n^2*x*e^(n*ln(x)) + 11*a*d*n^2*
x + 4*c*d*n*x*e^(2*n*ln(x)) + 2*c*n^2*x*e^(3*n*ln(x) + 1) + 3*b*n^2*x*e^(2*n*ln(
x) + 1) + 6*a*n^2*x*e^(n*ln(x) + 1) + 5*b*d*n*x*e^(n*ln(x)) + 6*a*d*n*x + c*d*x*
e^(2*n*ln(x)) + 3*c*n*x*e^(3*n*ln(x) + 1) + 4*b*n*x*e^(2*n*ln(x) + 1) + 5*a*n*x*
e^(n*ln(x) + 1) + b*d*x*e^(n*ln(x)) + a*d*x + c*x*e^(3*n*ln(x) + 1) + b*x*e^(2*n
*ln(x) + 1) + a*x*e^(n*ln(x) + 1))/(6*n^3 + 11*n^2 + 6*n + 1)